<!--热评和贴条-->
<script setup>
import {toRefs} from "vue";
import {UserContext} from "@ginstone/nga-api/dist/src/response/field/user/UserContext";
import {TopicDetail} from "@ginstone/nga-api/dist/src/response/field/TopicDetail";
import SubReply from "@/components/read/SubReply.vue";

const props = defineProps({
  data: {type: Array},
  userContext: {type: UserContext, required: true},
  topic: {type: TopicDetail, required: true},
  title: {type: String},
})

const {data} = toRefs(props)


</script>

<template>
  <div>
    <h5>{{ title }}</h5>
    <!--渲染热评和贴条-->
    <el-row>
      <el-col v-for="reply in data" :span="12">
        <sub-reply :author="userContext.getUserInfo(reply.authorUid)" :reply="reply"/>
      </el-col>
    </el-row>
  </div>
</template>

<style scoped>
.inline-block {
  display: inline-block;
}
</style>